<?php

namespace app\admin\model;

use think\Model;


class Partner extends BaseModel
{

    protected $schema = [
        'id' => 'int',
        'name' => 'string',
        'image' => 'int',
        'link' => 'string',
        'description' => 'string',
        'sort' => 'int',
        'is_del' => 'int',
        'create_time' => 'datetime',
        'creator' => 'int',
        'update_time' => 'datetime',
        'updater' => 'int'
    ];

    public function getSchema()
    {
        return $this->schema;
    }

    /**
     *  获取枚举字段
     */
    public function getAttributes($field)
    {
        if (isset($this->attributes[$field])) {
            $enum = $this->attributes[$field];
            if (is_array($enum)) {
                return $enum;
            }
        }
    }
}
